home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Freeware 2002 November
/
SGI Freeware 2002 November - Disc 2.iso
/
dist
/
fw_groff.idb
/
usr
/
freeware
/
catman
/
u_man
/
cat1
/
gtroff.Z
/
gtroff
Wrap
Text File
|
2002-04-08
|
65KB
|
1,464 lines
TROFF(1) TROFF(1)
NNAAMMEE
troff - format documents
SSYYNNOOPPSSIISS
ttrrooffff [ --aabbiivvzzCCEERRUU ] [ --ww_n_a_m_e ] [ --WW_n_a_m_e ] [ --dd_c_s ]
[ --ff_f_a_m ] [ --mm_n_a_m_e ] [ --nn_n_u_m ] [ --oo_l_i_s_t ] [ --rr_c_n ]
[ --TT_n_a_m_e ] [ --FF_d_i_r ] [ --MM_d_i_r ] [ _f_i_l_e_s_._._. ]
It is possible to have whitespace between a command line
option and its parameter.
DDEESSCCRRIIPPTTIIOONN
This manual page describes the GNU version of ttrrooffff, which
is part of the groff document formatting system. It is
highly compatible with UNIX troff. Usually it should be
invoked using the groff command, which will also run pre
processors and postprocessors in the appropriate order and
with the appropriate options.
OOPPTTIIOONNSS
--aa Generate an ASCII approximation of the typeset
output.
--bb Print a backtrace with each warning or error
message. This backtrace should help track down
the cause of the error. The line numbers given
in the backtrace may not always be correct:
ttrrooffff's idea of line numbers gets confused by aass
or aamm requests.
--ii Read the standard input after all the named
input files have been processed.
--vv Print the version number.
--ww_n_a_m_e Enable warning _n_a_m_e. Available warnings are
described in the Warnings subsection below.
Multiple --ww options are allowed.
--WW_n_a_m_e Inhibit warning _n_a_m_e. Multiple --WW options are
allowed.
--EE Inhibit all error messages.
--zz Suppress formatted output.
--CC Enable compatibility mode.
--dd_c_s
--dd_n_a_m_e==_s Define _c or _n_a_m_e to be a string _s; _c must be a
one letter name.
--ff_f_a_m Use _f_a_m as the default font family.
--mm_n_a_m_e Read in the file _n_a_m_e..ttmmaacc. If it isn't found,
try ttmmaacc.._n_a_m_e instead. It will be first
searched for in directories given with the --MM
command line option, then in directories given
in the GGRROOFFFF__TTMMAACC__PPAATTHH environment variable,
then in the current directory (only if in unsafe
mode), the home directory, /usr/free
ware/lib/groff/site-tmac,
/usr/freeware/share/groff/site-tmac, and
/usr/freeware/share/groff/1.17.2/tmac.
--UU Unsafe mode. This will enable the following
requests: ..ooppeenn, ..ooppeennaa, ..ppssoo, ..ssyy, and ..ppii.
For security reasons, these potentially danger
ous requests are disabled otherwise. It will
also add the current directory to the macro
search path.
--RR Don't load ttrrooffffrrcc and ttrrooffffrrcc--eenndd.
--nn_n_u_m Number the first page _n_u_m.
--oo_l_i_s_t Output only pages in _l_i_s_t, which is a comma-sep
arated list of page ranges; _n means print page
_n, _m--_n means print every page between _m and _n,
--_n means print every page up to _n, _n-- means
print every page from _n. TTrrooffff will exit after
printing the last page in the list.
--rr_c_n
--rr_n_a_m_e==_n Set number register _c or _n_a_m_e to _n; _c must be a
one character name; _n can be any troff numeric
expression.
--TT_n_a_m_e Prepare output for device _n_a_m_e, rather than the
default ppss.
--FF_d_i_r Search in directory (or directory path) _d_i_r for
subdirectories ddeevv_n_a_m_e (_n_a_m_e is the name of the
device) and there for the DDEESSCC file and font
files. _d_i_r is scanned before all other font
directories.
--MM_d_i_r Search directory (or directory path) _d_i_r for
macro files. This is scanned before all other
macro directories.
UUSSAAGGEE
Only the features not in UNIX troff are described here.
LLoonngg nnaammeess
The names of number registers, fonts,
strings/macros/diversions, special characters can be of
any length. In escape sequences, where you can use ((_x_x for
a two character name, you can use [[_x_x_x]] for a name of
arbitrary length:
\\[[_x_x_x]] Print the special character called _x_x_x.
\\ff[[_x_x_x]]
Set font _x_x_x.
\\**[[_x_x_x]]
Interpolate string _x_x_x.
\\nn[[_x_x_x]]
Interpolate number register _x_x_x.
FFrraaccttiioonnaall ppooiinnttssiizzeess
A _s_c_a_l_e_d _p_o_i_n_t is equal to 1/sizescale points, where
sizescale is specified in the DDEESSCC file (1 by default).
There is a new scale indicator zz which has the effect of
multiplying by sizescale. Requests and escape sequences
in troff interpret arguments that represent a pointsize as
being in units of scaled points, but they evaluate each
such argument using a default scale indicator of zz. Argu
ments treated in this way are the argument to the ppss
request, the third argument to the ccss request, the second
and fourth arguments to the ttkkff request, the argument to
the \\HH escape sequence, and those variants of the \\ss
escape sequence that take a numeric expression as their
argument.
For example, suppose sizescale is 1000; then a scaled
point will be equivalent to a millipoint; the request ..ppss
1100..2255 is equivalent to ..ppss 1100..2255zz and so sets the point
size to 10250 scaled points, which is equal to 10.25
points.
The number register \\nn[[..ss]] returns the pointsize in points
as decimal fraction. There is also a new number register
\\nn[[..ppss]] that returns the pointsize in scaled points.
It would make no sense to use the zz scale indicator in a
numeric expression whose default scale indicator was nei
ther uu nor zz, and so ttrrooffff disallows this. Similarly it
would make no sense to use a scaling indicator other than
zz or uu in a numeric expression whose default scale indica
tor was zz, and so ttrrooffff disallows this as well.
There is also new scale indicator ss which multiplies by
the number of units in a scaled point. So, for example,
\\nn[[..ppss]]ss is equal to 11mm. Be sure not to confuse the ss and
zz scale indicators.
NNuummeerriicc eexxpprreessssiioonnss
Spaces are permitted in a number expression within paren
theses.
MM indicates a scale of 100ths of an em.
_e_1>>??_e_2 The maximum of _e_1 and _e_2.
_e_1<<??_e_2 The minimum of _e_1 and _e_2.
((_c;;_e)) Evaluate _e using _c as the default scaling indica
tor. If _c is missing, ignore scaling indicators in
the evaluation of _e.
NNeeww eessccaappee sseeqquueenncceess
\\AA''_a_n_y_t_h_i_n_g''
This expands to 11 or 00 according as _a_n_y_t_h_i_n_g is or
is not acceptable as the name of a string, macro,
diversion, number register, environment or font.
It will return 00 if _a_n_y_t_h_i_n_g is empty. This is
useful if you want to lookup user input in some
sort of associative table.
\\BB''_a_n_y_t_h_i_n_g''
This expands to 11 or 00 according as _a_n_y_t_h_i_n_g is or
is not a valid numeric expression. It will return
00 if _a_n_y_t_h_i_n_g is empty.
\\CC''_x_x_x''
Typeset character named _x_x_x. Normally it is more
convenient to use \\[[_x_x_x]]. But \\CC has the advantage
that it is compatible with recent versions of UNIX
and is available in compatibility mode.
\\EE This is equivalent to an escape character, but it's
not interpreted in copy-mode. For example, strings
to start and end superscripting could be defined
like this:
.ds { \v'-.3m'\s'\En[.s]*6u/10u'
.ds } \s0\v'.3m'
The use of \\EE ensures that these definitions will
work even if \\**{{ gets interpreted in copy-mode (for
example, by being used in a macro argument).
\\NN''_n'' Typeset the character with code _n in the current
font. _n can be any integer. Most devices only
have characters with codes between 0 and 255. If
the current font does not contain a character with
that code, special fonts will _n_o_t be searched. The
\\NN escape sequence can be conveniently used on con
junction with the cchhaarr request:
..cchhaarr \\[[pphhoonnee]] \\ff((ZZDD\\NN''3377''
The code of each character is given in the fourth
column in the font description file after the
cchhaarrsseett command. It is possible to include unnamed
characters in the font description file by using a
name of ------; the \\NN escape sequence is the only way
to use these.
\\RR''_n_a_m_e __n''
This has the same effect as
..nnrr _n_a_m_e __n
\\ss((_n_n
\\ss((_n_n Set the point size to _n_n points; _n_n must be exactly
two digits.
\\ss[[_n]]
\\ss[[_n]]
\\ss''_n''
\\ss''_n'' Set the point size to _n scaled points; _n is a
numeric expression with a default scale indicator
of zz.
\\VV_x
\\VV((_x_x
\\VV[[_x_x_x]]
Interpolate the contents of the environment vari
able _x_x_x, as returned by ggeetteennvv(3). \\VV is inter
preted in copy-mode.
\\YY_x
\\YY((_x_x
\\YY[[_x_x_x]]
This is approximately equivalent to \\XX''\\**[[_x_x_x]]''.
However the contents of the string or macro _x_x_x are
not interpreted; also it is permitted for _x_x_x to
have been defined as a macro and thus contain new
lines (it is not permitted for the argument to \\XX
to contain newlines). The inclusion of newlines
requires an extension to the UNIX troff output for
mat, and will confuse drivers that do not know
about this extension.
\\ZZ''_a_n_y_t_h_i_n_g''
Print anything and then restore the horizontal and
vertical position; _a_n_y_t_h_i_n_g may not contain tabs or
leaders.
\\$$00 The name by which the current macro was invoked.
The aallss request can make a macro have more than one
name.
\\$$** In a macro, the concatenation of all the arguments
separated by spaces.
\\$$@@ In a macro, the concatenation of all the arguments
with each surrounded by double quotes, and sepa
rated by spaces.
\\$$((_n_n
\\$$[[_n_n_n]]
In a macro, this gives the _n_n-th or _n_n_n-th argu
ment. Macros can have an unlimited number of argu
ments.
\\??_a_n_y_t_h_i_n_g\\??
When used in a diversion, this will transparently
embed _a_n_y_t_h_i_n_g in the diversion. _a_n_y_t_h_i_n_g is read
in copy mode. When the diversion is reread, _a_n_y_
_t_h_i_n_g will be interpreted. _a_n_y_t_h_i_n_g may not con
tain newlines; use \\!! if you want to embed newlines
in a diversion. The escape sequence \\?? is also
recognised in copy mode and turned into a single
internal code; it is this code that terminates _a_n_y_
_t_h_i_n_g. Thus
..nnrr xx 11
..nnff
..ddii dd
\\??\\\\??\\\\\\\\??\\\\\\\\\\\\\\\\nnxx\\\\\\\\??\\\\??\\??
..ddii
..nnrr xx 22
..ddii ee
..dd
..ddii
..nnrr xx 33
..ddii ff
..ee
..ddii
..nnrr xx 44
..ff
will print 44.
\\// This increases the width of the preceding character
so that the spacing between that character and the
following character will be correct if the follow
ing character is a roman character. For example,
if an italic f is immediately followed by a roman
right parenthesis, then in many fonts the top right
portion of the f will overlap the top left of the
right parenthesis producing _f), which is ugly.
Inserting \\// produces _f) and avoids this problem.
It is a good idea to use this escape sequence when
ever an italic character is immediately followed by
a roman character without any intervening space.
\\,, This modifies the spacing of the following charac
ter so that the spacing between that character and
the preceding character will correct if the preced
ing character is a roman character. For example,
inserting \\,, between the parenthesis and the f
changes (_f to (_f. It is a good idea to use this
escape sequence whenever a roman character is imme
diately followed by an italic character without any
intervening space.
\\)) Like \\&& except that it behaves like a character
declared with the ccffllaaggss request to be transparent
for the purposes of end of sentence recognition.
\\~~ This produces an unbreakable space that stretches
like a normal inter-word space when a line is
adjusted.
\\:: This causes the insertion of a zero-width break
point. It is equal to \\%% but without insertion of
a soft hyphen character.
\\## Everything up to and including the next newline is
ignored. This is interpreted in copy mode. This
is like \\"" except that \\"" does not ignore the ter
minating newline.
NNeeww rreeqquueessttss
..aallnn _x_x _y_y
Create an alias _x_x for number register object named
_y_y. The new name and the old name will be exactly
equivalent. If _y_y is undefined, a warning of type
rreegg will be generated, and the request will be
ignored.
..aallss _x_x _y_y
Create an alias _x_x for request, string, macro, or
diversion object named _y_y. The new name and the
old name will be exactly equivalent (it is similar
to a hard rather than a soft link). If _y_y is unde
fined, a warning of type mmaacc will be generated, and
the request will be ignored. The ddee, aamm, ddii, ddaa,
ddss, and aass requests only create a new object if the
name of the macro, diversion or string diversion is
currently undefined or if it is defined to be a
request; normally they modify the value of an
existing object.
..aamm11 _x_x _y_y
Similar to ..aamm, but compatibility mode is switched
off during execution. On entry, the current com
patibility mode is saved and restored at exit.
..aasscciiiiffyy _x_x
This request `unformats' the diversion _x_x in such a
way that ASCII and space characters (and some
escape sequences) that were formatted and diverted
into _x_x will be treated like ordinary input charac
ters when _x_x is reread. Useful for diversions in
conjunction with the ..wwrriitteemm request. It can be
also used for gross hacks; for example, this
..ttrr @@..
..ddii xx
@@nnrr nn 11
..bbrr
..ddii
..ttrr @@@@
..aasscciiiiffyy xx
..xx
will set register nn to 1. Note that glyph informa
tion (font, font size, etc.) is not preserved; use
..uunnffoorrmmaatt instead.
..bbaacckkttrraaccee
Print a backtrace of the input stack on stderr.
..bbllmm _x_x
Set the blank line macro to _x_x. If there is a
blank line macro, it will be invoked when a blank
line is encountered instead of the usual troff
behaviour.
..bbooxx _x_x
..bbooxxaa _x_x
These requests are similar to the ddii and ddaa
requests with the exception that a partially filled
line will not become part of the diversion (i.e.,
the diversion always starts with a new line) but
restored after ending the diversion, discarding the
partially filled line which possibly comes from the
diversion.
..bbrreeaakk Break out of a while loop. See also the wwhhiillee and
ccoonnttiinnuuee requests. Be sure not to confuse this
with the bbrr request.
..bbrrpp This is the same as \\pp.
..ccffllaaggss _n _c_1 _c_2_._._.
Characters _c_1, _c_2,... have properties determined
by _n, which is ORed from the following:
1 the character ends sentences (initially
characters ..??!! have this property);
2 lines can be broken before the character
(initially no characters have this prop
erty); a line will not be broken at a char
acter with this property unless the charac
ters on each side both have non-zero hyphen
ation codes.
4 lines can be broken after the character
(initially characters --\\((hhyy\\((eemm have this
property); a line will not be broken at a
character with this property unless the
characters on each side both have non-zero
hyphenation codes.
8 the character overlaps horizontally (ini
tially characters \\((uull\\((rrnn\\((rruu have this
property);
16 the character overlaps vertically (initially
character \\((bbrr has this property);
32 an end of sentence character followed by any
number of characters with this property will
be treated as the end of a sentence if fol
lowed by a newline or two spaces; in other
words the character is transparent for the
purposes of end of sentence recognition;
this is the same as having a zero space fac
tor in TeX (initially characters
""''))]]**\\((ddgg\\((rrqq have this property).
..cchhaarr _c _s_t_r_i_n_g
Define character _c to be _s_t_r_i_n_g. Every time char
acter _c needs to be printed, _s_t_r_i_n_g will be pro
cessed in a temporary environment and the result
will be wrapped up into a single object. Compati
bility mode will be turned off and the escape char
acter will be set to \\ while _s_t_r_i_n_g is being pro
cessed. Any emboldening, constant spacing or track
kerning will be applied to this object rather than
to individual characters in _s_t_r_i_n_g. A character
defined by this request can be used just like a
normal character provided by the output device. In
particular other characters can be translated to it
with the ttrr request; it can be made the leader
character by the llcc request; repeated patterns can
be drawn with the character using the \\ll and \\LL
escape sequences; words containing the character
can be hyphenated correctly, if the hhccooddee request
is used to give the character a hyphenation code.
There is a special anti-recursion feature: use of
character within the character's definition will be
handled like normal characters not defined with
cchhaarr. A character definition can be removed with
the rrcchhaarr request.
..cchhoopp _x_x
Chop the last character off macro, string, or
diversion _x_x. This is useful for removing the new
line from the end of diversions that are to be
interpolated as strings.
..cclloossee _s_t_r_e_a_m
Close the stream named _s_t_r_e_a_m; _s_t_r_e_a_m will no
longer be an acceptable argument to the wwrriittee
request. See the ooppeenn request.
..ccoonnttiinnuuee
Finish the current iteration of a while loop. See
also the wwhhiillee and bbrreeaakk requests.
..ccpp _n If _n is non-zero or missing, enable compatibility
mode, otherwise disable it. In compatibility mode,
long names are not recognised, and the incompati
bilities caused by long names do not arise.
..ddeeii _x_x _y_y
Define macro indirectly. The following example
..ddss xxxx aaaa
..ddss yyyy bbbb
..ddeeii xxxx yyyy
is equivalent to
..ddee aaaa bbbb
..ddee11 _x_x _y_y
Similar to ..ddee, but compatibility mode is switched
off during execution. On entry, the current com
patibility mode is saved and restored at exit.
..ddoo _x_x_x
Interpret _._x_x_x with compatibility mode disabled.
For example,
..ddoo ffaamm TT
would have the same effect as
..ffaamm TT
except that it would work even if compatibility
mode had been enabled. Note that the previous com
patibility mode is restored before any files
sourced by _x_x_x are interpreted.
..eeccss Save current escape character.
..eeccrr Restore escape character saved with eeccss. Without a
previous call to eeccss, `\\' will be the new escape
character.
..eevvcc _x_x
Copy the contents of environment _x_x to the current
environment. No pushing or popping of environents
will be done.
..ffaamm _x_x
Set the current font family to _x_x. The current
font family is part of the current environment. If
_x_x is missing, switch back to previous font family.
See the description of the ssttyy request for more
information on font families.
..ffssppeecciiaall _f _s_1 _s_2_._._.
When the current font is _f, fonts _s_1, _s_2,... will
be special, that is, they will searched for charac
ters not in the current font. Any fonts specified
in the ssppeecciiaall request will be searched after fonts
specified in the ffssppeecciiaall request.
..ffttrr _f _g
Translate font _f to _g. Whenever a font named _f is
referred to in \\ff escape sequence, or in the fftt,
uull, bbdd, ccss, ttkkff, ssppeecciiaall, ffssppeecciiaall, ffpp, or ssttyy
requests, font _g will be used. If _g is missing, or
equal to _f then font _f will not be translated.
..hhccooddee _c_1 _c_o_d_e_1 _c_2 _c_o_d_e_2_._._.
Set the hyphenation code of character _c_1 to _c_o_d_e_1
and that of _c_2 to _c_o_d_e_2. A hyphenation code must
be a single input character (not a special charac
ter) other than a digit or a space. Initially each
lower-case letter has a hyphenation code, which is
itself, and each upper-case letter has a hyphen
ation code which is the lower case version of
itself. See also the hhppff request.
..hhllaa _l_a_n_g
Set the current hyphenation language to _l_a_n_g.
Hyphenation exceptions specified with the hhww
request and hyphenation patterns specified with the
hhppff request are both associated with the current
hyphenation language. The hhllaa request is usually
invoked by the ttrrooffffrrcc file.
..hhllmm _n Set the maximum number of consecutive hyphenated
lines to _n. If _n is negative, there is no maximum.
The default value is -1. This value is associated
with the current environment. Only lines output
from an environment count towards the maximum
associated with that environment. Hyphens result
ing from \\%% are counted; explicit hyphens are not.
..hhppff _f_i_l_e
Read hyphenation patterns from _f_i_l_e; this will be
searched for in the same way that _n_a_m_e..ttmmaacc is
searched for when the --mm_n_a_m_e option is specified.
It should have the same format as the argument to
the \patterns primitive in TeX; the letters appear
ing in this file are interpreted as hyphenation
codes. A %% character in the patterns file intro
duces a comment that continues to the end of the
line. The set of hyphenation patterns is associ
ated with the current language set by the hhllaa
request. The hhppff request is usually invoked by the
ttrrooffffrrcc file.
..hhyymm _n Set the _h_y_p_h_e_n_a_t_i_o_n _m_a_r_g_i_n to _n: when the current
adjustment mode is not bb, the line will not be
hyphenated if the line is no more than _n short.
The default hyphenation margin is 0. The default
scaling indicator for this request is _m. The
hyphenation margin is associated with the current
environment. The current hyphenation margin is
available in the \\nn[[..hhyymm]] register.
..hhyyss _n Set the _h_y_p_h_e_n_a_t_i_o_n _s_p_a_c_e to _n: when the current
adjustment mode is bb don't hyphenate the line if
the line can be justified by adding no more than _n
extra space to each word space. The default
hyphenation space is 0. The default scaling indi
cator for this request is mm. The hyphenation space
is associated with the current environment. The
current hyphenation space is available in the
\\nn[[..hhyyss]] register.
..kkeerrnn _n
If _n is non-zero or missing, enable pairwise kern
ing, otherwise disable it.
..lleennggtthh _x_x _s_t_r_i_n_g
Compute the length of _s_t_r_i_n_g and return it in the
number register _x_x (which is not necessarily
defined before).
..lliinneettaabbss _n
If _n is non-zero or missing, enable line-tabs mode,
otherwise disable it (which is the default). In
line-tabs mode, tab distances are computed relative
to the (current) output line. Otherwise they are
taken relative to the input line. For example, the
following
..ddss xx aa\\tt\\cc
..ddss yy bb\\tt\\cc
..ddss zz cc
..ttaa 11ii 33ii
\\**xx
\\**yy
\\**zz
yields
a b c
In line-tabs mode, the same code gives
a b c
Line-tabs mode is associated with the current envi
ronment; the read-only number register
\\nn[[..lliinneettaabbss]] is set to 1 if in line-tabs mode, and
0 otherwise.
..mmssoo _f_i_l_e
The same as the ssoo request except that _f_i_l_e is
searched for in the same directories as macro files
for the the --mm command line option. If the file
name to be included has the form _n_a_m_e..ttmmaacc and it
isn't found, mmssoo tries to include ttmmaacc.._n_a_m_e instead
and vice versa.
..nnoopp _a_n_y_t_h_i_n_g
Execute _a_n_y_t_h_i_n_g. This is similar to `.if 1'.
..nnrrooffff Make the nn built-in condition true and the tt built-
in condition false. This can be reversed using the
ttrrooffff request.
..ooppeenn _s_t_r_e_a_m _f_i_l_e_n_a_m_e
Open _f_i_l_e_n_a_m_e for writing and associate the stream
named _s_t_r_e_a_m with it. See also the cclloossee and wwrriittee
requests.
..ooppeennaa _s_t_r_e_a_m _f_i_l_e_n_a_m_e
Like ooppeenn, but if _f_i_l_e_n_a_m_e exists, append to it
instead of truncating it.
..ppnnrr Print the names and contents of all currently
defined number registers on stderr.
..ppssbbbb _f_i_l_e_n_a_m_e
Get the bounding box of a PostScript image _f_i_l_e_
_n_a_m_e. This file must conform to Adobe's Document
Structuring Conventions; the command looks for a
%%%%BBoouunnddiinnggBBooxx comment to extract the bounding box
values. After a successful call, the coordinates
(in PostScript units) of the lower left and upper
right corner can be found in the registers \\nn[[llllxx]],
\\nn[[llllyy]], \\nn[[uurrxx]], and \\nn[[uurryy]], respectively. If
some error has occurred, the four registers are set
to zero.
..ppssoo _c_o_m_m_a_n_d
This behaves like the ssoo request except that input
comes from the standard output of _c_o_m_m_a_n_d.
..ppttrr Print the names and positions of all traps (not
including input line traps and diversion traps) on
stderr. Empty slots in the page trap list are
printed as well, because they can affect the prior
ity of subsequently planted traps.
..rrcchhaarr _c_1 _c_2_._._.
Remove the definitions of characters _c_1, _c_2,...
This undoes the effect of a cchhaarr request.
..rreettuurrnn
Within a macro, return immediately. No effect oth
erwise.
..rrjj
..rrjj _n Right justify the next _n input lines. Without an
argument right justify the next input line. The
number of lines to be right justified is available
in the \\nn[[..rrjj]] register. This implicitly does
..ccee 00. The ccee request implicitly does ..rrjj 00.
..rrnnnn _x_x _y_y
Rename number register _x_x to _y_y.
..sshhcc _c Set the soft hyphen character to _c. If _c is omit
ted, the soft hyphen character will be set to the
default \\((hhyy. The soft hyphen character is the
character which will be inserted when a word is
hyphenated at a line break. If the soft hyphen
character does not exist in the font of the charac
ter immediately preceding a potential break point,
then the line will not be broken at that point.
Neither definitions (specified with the cchhaarr
request) nor translations (specified with the ttrr
request) are considered when finding the soft
hyphen character.
..sshhiifftt _n
In a macro, shift the arguments by _n positions:
argument _i becomes argument _i-_n; arguments 1 to _n
will no longer be available. If _n is missing,
arguments will be shifted by 1. Shifting by nega
tive amounts is currently undefined.
..ssppeecciiaall _s_1 _s_2_._._.
Fonts _s_1, _s_2, are special and will be searched for
characters not in the current font.
..ssttyy _n _f
Associate style _f with font position _n. A font
position can be associated either with a font or
with a style. The current font is the index of a
font position and so is also either a font or a
style. When it is a style, the font that is actu
ally used is the font the name of which is the con
catenation of the name of the current family and
the name of the current style. For example, if the
current font is 1 and font position 1 is associated
with style RR and the current font family is TT, then
font TTRR will be used. If the current font is not a
style, then the current family is ignored. When
the requests ccss, bbdd, ttkkff, uuff, or ffssppeecciiaall are
applied to a style, then they will instead be
applied to the member of the current family corre
sponding to that style. The default family can be
set with the --ff option. The styles command in the
DESC file controls which font positions (if any)
are initially associated with styles rather than
fonts.
..ssuubbssttrriinngg _x_x _n_1 [[_n_2]]
Replace the string in register _x_x with the sub
string defined by the indices _n_1 and _n_2. The first
character in the string has index one. If _n_2 is
omitted, it is taken to be equal to the string's
length. If the index value _n_1 or _n_2 is negative or
zero, it will be counted from the end of the
string, going backwards: The last character has
index 0, the character before the last character
has index -1, etc.
..ttkkff _f _s_1 _n_1 _s_2 _n_2
Enable track kerning for font _f. When the current
font is _f the width of every character will be
increased by an amount between _n_1 and _n_2; when the
current point size is less than or equal to _s_1 the
width will be increased by _n_1; when it is greater
than or equal to _s_2 the width will be increased by
_n_2; when the point size is greater than or equal to
_s_1 and less than or equal to _s_2 the increase in
width is a linear function of the point size.
..ttmm11 _s_t_r_i_n_g
Similar to the ttmm request, _s_t_r_i_n_g is read in copy
mode and written on the standard error, but an ini
tial double quote in _s_t_r_i_n_g is stripped off to
allow initial blanks.
..ttmmcc _s_t_r_i_n_g
Similar to ttmm11 but without writing a final newline.
..ttrrff _f_i_l_e_n_a_m_e
Transparently output the contents of file _f_i_l_e_n_a_m_e.
Each line is output as it would be were it preceded
by \\!!; however, the lines are not subject to copy-
mode interpretation. If the file does not end with
a newline, then a newline will be added. For exam
ple, you can define a macro _x containing the con
tents of file _f, using
..ddii _x
..ttrrff _f
..ddii
Unlike with the ccff request, the file cannot contain
characters such as NUL that are not legal troff
input characters.
..ttrrnntt aabbccdd
This is the same as the ttrr request except that the
translations do not apply to text that is transpar
ently throughput into a diversion with \\!!. For
example,
..ttrr aabb
..ddii xx
\\!!..ttmm aa
..ddii
..xx
will print bb; if ttrrnntt is used instead of ttrr it will
print aa.
..ttrrooffff Make the nn built-in condition false, and the tt
built-in condition true. This undoes the effect of
the nnrrooffff request.
..uunnffoorrmmaatt _x_x
This request `unformats' the diversion _x_x. Con
trary to the ..aasscciiiiffyy request, which tries to con
vert formatted elements of the diversion back to
input tokens as much as possible, ..uunnffoorrmmaatt will
only handle tabs and spaces between words (usually
caused by spaces or newlines in the input) spe
cially. The former are treated as if they were
input tokens, and the latter are stretchable again.
Note that the vertical size of lines is not
preserved. Glyph information (font, font size,
space width, etc.) is retained. Useful in conjunc
tion with the ..bbooxx and ..bbooxxaa requests.
..vvpptt _n Enable vertical position traps if _n is non-zero,
disable them otherwise. Vertical position traps
are traps set by the wwhh or ddtt requests. Traps set
by the iitt request are not vertical position traps.
The parameter that controls whether vertical posi
tion traps are enabled is global. Initially verti
cal position traps are enabled.
..wwaarrnn _n
Control warnings. _n is the sum of the numbers
associated with each warning that is to be enabled;
all other warnings will be disabled. The number
associated with each warning is listed in the
`Warnings' section. For example, ..wwaarrnn 00 will dis
able all warnings, and ..wwaarrnn 11 will disable all
warnings except that about missing characters. If
_n is not given, all warnings will be enabled.
..wwhhiillee _c _a_n_y_t_h_i_n_g
While condition _c is true, accept _a_n_y_t_h_i_n_g as
input; _c can be any condition acceptable to an iiff
request; _a_n_y_t_h_i_n_g can comprise multiple lines if
the first line starts with \\{{ and the last line
ends with \\}}. See also the bbrreeaakk and ccoonnttiinnuuee
requests.
..wwrriittee _s_t_r_e_a_m _a_n_y_t_h_i_n_g
Write _a_n_y_t_h_i_n_g to the stream named _s_t_r_e_a_m. _s_t_r_e_a_m
must previously have been the subject of an ooppeenn
request. _a_n_y_t_h_i_n_g is read in copy mode; a leading
"" will be stripped.
..wwrriitteemm _s_t_r_e_a_m _x_x
Write the contents of the macro or string _x_x to the
stream named _s_t_r_e_a_m. _s_t_r_e_a_m must previously have
been the subject of an ooppeenn request. _x_x is read in
copy mode.
EExxtteennddeedd rreeqquueessttss
..ccff _f_i_l_e_n_a_m_e
When used in a diversion, this will embed in the
diversion an object which, when reread, will cause
the contents of _f_i_l_e_n_a_m_e to be transparently copied
through to the output. In UNIX troff, the contents
of _f_i_l_e_n_a_m_e is immediately copied through to the
output regardless of whether there is a current
diversion; this behaviour is so anomalous that it
must be considered a bug.
..eevv _x_x If _x_x is not a number, this will switch to a named
environment called _x_x. The environment should be
popped with a matching eevv request without any argu
ments, just as for numbered environments. There is
no limit on the number of named environments; they
will be created the first time that they are refer
enced.
..ffpp _n _f_1 _f_2
The ffpp request has an optional third argument.
This argument gives the external name of the font,
which is used for finding the font description
file. The second argument gives the internal name
of the font which is used to refer to the font in
troff after it has been mounted. If there is no
third argument then the internal name will be used
as the external name. This feature allows you to
use fonts with long names in compatibility mode.
..ssss _m _n
When two arguments are given to the ssss request, the
second argument gives the _s_e_n_t_e_n_c_e _s_p_a_c_e _s_i_z_e. If
the second argument is not given, the sentence
space size will be the same as the word space size.
Like the word space size, the sentence space is in
units of one twelfth of the spacewidth parameter
for the current font. Initially both the word
space size and the sentence space size are 12.
Contrary to UNIX troff, GNU troff handles this
request in nroff mode also; a given value is then
rounded down to the nearest multiple of 12. The
sentence space size is used in two circumstances:
if the end of a sentence occurs at the end of a
line in fill mode, then both an inter-word space
and a sentence space will be added; if two spaces
follow the end of a sentence in the middle of a
line, then the second space will be a sentence
space. Note that the behaviour of UNIX troff will
be exactly that exhibited by GNU troff if a second
argument is never given to the ssss request. In GNU
troff, as in UNIX troff, you should always follow a
sentence with either a newline or two spaces.
..ttaa _n_1 _n_2_._._._n_n TT _r_1 _r_2_._._._r_n
Set tabs at positions _n_1, _n_2,..., _n_n and then set
tabs at _n_n+_r_1, _n_n+_r_2,...., _n_n+_r_n and then at
_n_n+_r_n+_r_1, _n_n+_r_n+_r_2,..., _n_n+_r_n+_r_n, and so on. For
example,
..ttaa TT ..55ii
will set tabs every half an inch.
NNeeww nnuummbbeerr rreeggiisstteerrss
The following read-only registers are available:
\\nn[[..CC]] 1 if compatibility mode is in effect, 0 otherwise.
\\nn[[..ccddpp]]
The depth of the last character added to the cur
rent environment. It is positive if the character
extends below the baseline.
\\nn[[..ccee]]
The number of lines remaining to be centered, as
set by the ccee request.
\\nn[[..cchhtt]]
The height of the last character added to the cur
rent environment. It is positive if the character
extends above the baseline.
\\nn[[..ccsskk]]
The skew of the last character added to the current
environment. The _s_k_e_w of a character is how far to
the right of the center of a character the center
of an accent over that character should be placed.
\\nn[[..eevv]]
The name or number of the current environment.
This is a string-valued register.
\\nn[[..ffaamm]]
The current font family. This is a string-valued
register.
\\nn[[..ffpp]]
The number of the next free font position.
\\nn[[..gg]] Always 1. Macros should use this to determine
whether they are running under GNU troff.
\\nn[[..hhllaa]]
The current hyphenation language as set by the hhllaa
request.
\\nn[[..hhllcc]]
The number of immediately preceding consecutive
hyphenated lines.
\\nn[[..hhllmm]]
The maximum allowed number of consecutive hyphen
ated lines, as set by the hhllmm request.
\\nn[[..hhyy]]
The current hyphenation flags (as set by the hhyy
request).
\\nn[[..hhyymm]]
The current hyphenation margin (as set by the hhyymm
request).
\\nn[[..hhyyss]]
The current hyphenation space (as set by the hhyyss
request).
\\nn[[..iinn]]
The indent that applies to the current output line.
\\nn[[..iinntt]]
Set to a positive value if last output line is
interrupted (i.e., if it contains _\_c).
\\nn[[..kkeerrnn]]
11 if pairwise kerning is enabled, 00 otherwise.
\\nn[[..llgg]]
The current ligature mode (as set by the llgg
request).
\\nn[[..lliinneettaabbss]]
The current line-tabs mode (as set by the lliinneettaabbss
request).
\\nn[[..llll]]
The line length that applies to the current output
line.
\\nn[[..lltt]]
The title length as set by the lltt request.
\\nn[[..nnee]]
The amount of space that was needed in the last nnee
request that caused a trap to be sprung. Useful in
conjunction with the \\nn[[..ttrruunncc]] register.
\\nn[[..nnss]]
11 if no-space mode is active, 00 otherwise.
\\nn[[..ppnn]]
The number of the next page: either the value set
by a ppnn request, or the number of the current page
plus 1.
\\nn[[..ppss]]
The current pointsize in scaled points.
\\nn[[..ppssrr]]
The last-requested pointsize in scaled points.
\\nn[[..rrjj]]
The number of lines to be right-justified as set by
the rrjj request.
\\nn[[..ssrr]]
The last requested pointsize in points as a decimal
fraction. This is a string-valued register.
\\nn[[..ttaabbss]]
A string representation of the current tab settings
suitable for use as an argument to the ttaa request.
\\nn[[..ttrruunncc]]
The amount of vertical space truncated by the most
recently sprung vertical position trap, or, if the
trap was sprung by a nnee request, minus the amount
of vertical motion produced by the nnee request. In
other words, at the point a trap is sprung, it rep
resents the difference of what the vertical posi
tion would have been but for the trap, and what the
vertical position actually is. Useful in conjunc
tion with the \\nn[[..nnee]] register.
\\nn[[..ssss]]
\\nn[[..ssssss]]
These give the values of the parameters set by the
first and second arguments of the ssss request.
\\nn[[..vvpptt]]
1 if vertical position traps are enabled, 0 other
wise.
\\nn[[..wwaarrnn]]
The sum of the numbers associated with each of the
currently enabled warnings. The number associated
with each warning is listed in the `Warnings' sub
section.
\\nn[[..xx]] The major version number. For example, if the ver
sion number is 11..0033 then \\nn[[..xx]] will contain 11.
\\nn[[..yy]] The minor version number. For example, if the ver
sion number is 11..0033 then \\nn[[..yy]] will contain 0033.
\\nn[[..YY]] The revision number of groff.
\\nn[[llllxx]]
\\nn[[llllyy]]
\\nn[[uurrxx]]
\\nn[[uurryy]]
These four registers are set by the ..ppssbbbb request
and contain the bounding box values (in PostScript
units) of a given PostScript image.
The following read/write registers are set by the \\ww
escape sequence:
\\nn[[rrsstt]]
\\nn[[rrssbb]]
Like the sstt and ssbb registers, but takes account of
the heights and depths of characters.
\\nn[[sssscc]]
The amount of horizontal space (possibly negative)
that should be added to the last character before a
subscript.
\\nn[[sskkww]]
How far to right of the center of the last charac
ter in the \\ww argument, the center of an accent
from a roman font should be placed over that char
acter.
Other available read/write number registers are:
\\nn[[cc..]] The current input line number. \\nn[[..cc]] is a read-
only alias to this register.
\\nn[[hhpp]] The current horizontal position at input line.
\\nn[[ssyyssttaatt]]
The return value of the system() function executed
by the last ssyy request.
\\nn[[sslliimmiitt]]
If greater than 0, the maximum number of objects on
the input stack. If less than or equal to 0, there
is no limit on the number of objects on the input
stack. With no limit, recursion can continue until
virtual memory is exhausted.
\\nn[[yyeeaarr]]
The current year. Note that the traditional ttrrooffff
number register \\nn[[yyrr]] is the current year minus
1900.
MMiisscceellllaanneeoouuss
ttrrooffff predefines a single (read/write) string-based regis
ter, \\**((..TT, which contains the argument given to the --TT
command line option, namely the current output device (for
example, _l_a_t_i_n_1 or _a_s_c_i_i). Note that this is not the same
as the (read-only) number register \\nn[[..TT]] which is defined
to be 1 if ttrrooffff is called with the --TT command line
option, and zero otherwise. This behaviour is different
to UNIX troff.
Fonts not listed in the DESC file are automatically
mounted on the next available font position when they are
referenced. If a font is to be mounted explicitly with
the ffpp request on an unused font position, it should be
mounted on the first unused font position, which can be
found in the \\nn[[..ffpp]] register; although ttrrooffff does not
enforce this strictly, it will not allow a font to be
mounted at a position whose number is much greater than
that of any currently used position.
Interpolating a string does not hide existing macro
arguments. Thus in a macro, a more efficient way of doing
.._x_x \\\\$$@@
is
\\\\**[[_x_x]]\\\\
If the font description file contains pairwise kerning
information, characters from that font will be kerned.
Kerning between two characters can be inhibited by placing
a \\&& between them.
In a string comparison in a condition, characters that
appear at different input levels to the first delimiter
character will not be recognised as the second or third
delimiters. This applies also to the ttll request. In a \\ww
escape sequence, a character that appears at a different
input level to the starting delimiter character will not
be recognised as the closing delimiter character. When
decoding a macro argument that is delimited by double
quotes, a character that appears at a different input
level to the starting delimiter character will not be
recognised as the closing delimiter character. The imple
mentation of \\$$@@ ensures that the double quotes surround
ing an argument will appear the same input level, which
will be different to the input level of the argument
itself. In a long escape name ]] will not be recognized as
a closing delimiter except when it occurs at the same
input level as the opening ]]. In compatibility mode, no
attention is paid to the input-level.
There are some new types of condition:
..iiff rr_x_x_x
True if there is a number register named _x_x_x.
..iiff dd_x_x_x
True if there is a string, macro, diversion, or
request named _x_x_x.
..iiff cc_c_h
True if there is a character _c_h available; _c_h is
either an ASCII character or a special character
\\((_x_x or \\[[_x_x_x]]; the condition will also be true if
_c_h has been defined by the cchhaarr request.
The ttrr request can now map characters onto \\~~.
WWaarrnniinnggss
The warnings that can be given by ttrrooffff are divided into
the following categories. The name associated with each
warning is used by the --ww and --WW options; the number is
used by the wwaarrnn request, and by the ..wwaarrnn register.
cchhaarr 1 Non-existent characters. This is
enabled by default.
nnuummbbeerr 2 Invalid numeric expressions. This is
enabled by default.
bbrreeaakk 4 In fill mode, lines which could not be
broken so that their length was less
than the line length. This is enabled
by default.
ddeelliimm 8 Missing or mismatched closing delim
iters.
eell 16 Use of the eell request with no matching
iiee request.
ssccaallee 32 Meaningless scaling indicators.
rraannggee 64 Out of range arguments.
ssyynnttaaxx 128 Dubious syntax in numeric expressions.
ddii 256 Use of ddii or ddaa without an argument
when there is no current diversion.
mmaacc 512 Use of undefined strings, macros and
diversions. When an undefined string,
macro or diversion is used, that string
is automatically defined as empty. So,
in most cases, at most one warning will
be given for each name.
rreegg 1024 Use of undefined number registers.
When an undefined number register is
used, that register is automatically
defined to have a value of 0. a defi
nition is automatically made with a
value of 0. So, in most cases, at most
one warning will be given for use of a
particular name.
ttaabb 2048 Inappropriate use of a tab character.
Either use of a tab character where a
number was expected, or use of tab
character in an unquoted macro argu
ment.
rriigghhtt--bbrraaccee 4096 Use of \\}} where a number was expected.
mmiissssiinngg 8192 Requests that are missing non-optional
arguments.
iinnppuutt 16384 Illegal input characters.
eessccaappee 32768 Unrecognized escape sequences. When an
unrecognized escape sequence is encoun
tered, the escape character is ignored.
ssppaaccee 65536 Missing space between a request or
macro and its argument. This warning
will be given when an undefined name
longer than two characters is encoun
tered, and the first two characters of
the name make a defined name. The
request or macro will not be invoked.
When this warning is given, no macro is
automatically defined. This is enabled
by default. This warning will never
occur in compatibility mode.
ffoonntt 131072 Non-existent fonts. This is enabled by
default.
iigg 262144 Illegal escapes in text ignored with
the iigg request. These are conditions
that are errors when they do not occur
in ignored text.
There are also names that can be used to refer to groups
of warnings:
aallll All warnings except ddii, mmaacc and rreegg. It is
intended that this covers all warnings that are
useful with traditional macro packages.
ww All warnings.
IInnccoommppaattiibbiilliittiieess
Long names cause some incompatibilities. UNIX troff will
interpret
..ddssaabbccdd
as defining a string aabb with contents ccdd. Normally, GNU
troff will interpret this as a call of a macro named
ddssaabbccdd. Also UNIX troff will interpret \\**[[ or \\nn[[ as ref
erences to a string or number register called [[. In GNU
troff, however, this will normally be interpreted as the
start of a long name. In _c_o_m_p_a_t_i_b_i_l_i_t_y _m_o_d_e GNU troff
will interpret these things in the traditional way. In
compatibility mode, however, long names are not recog
nised. Compatibility mode can be turned on with the --CC
command line option, and turned on or off with the ccpp
request. The number register \\nn[[..CC]] is 1 if compatibility
mode is on, 0 otherwise.
GNU troff does not allow the use of the escape sequences
\\\\||\\^^\\&&\\}}\\{{\\(space)\\''\\``\\--\\__\\!!\\%%\\cc in names of strings,
macros, diversions, number registers, fonts or environ
ments; UNIX troff does. The \\AA escape sequence may be
helpful in avoiding use of these escape sequences in
names.
Fractional pointsizes cause one noteworthy incompatibil
ity. In UNIX troff the ppss request ignores scale indica
tors and so
..ppss 1100uu
will set the pointsize to 10 points, whereas in GNU troff
it will set the pointsize to 10 scaled points.
In GNU troff there is a fundamental difference between
unformatted, input characters, and formatted, output char
acters. Everything that affects how an output character
will be output is stored with the character; once an out
put character has been constructed it is unaffected by any
subsequent requests that are executed, including bbdd, ccss,
ttkkff, ttrr, or ffpp requests. Normally output characters are
constructed from input characters at the moment immedi
ately before the character is added to the current output
line. Macros, diversions and strings are all, in fact,
the same type of object; they contain lists of input char
acters and output characters in any combination. An out
put character does not behave like an input character for
the purposes of macro processing; it does not inherit any
of the special properties that the input character from
which it was constructed might have had. For example,
..ddii xx
\\\\\\\\
..bbrr
..ddii
..xx
will print \\\\ in GNU troff; each pair of input \\s is
turned into one output \\ and the resulting output \\s are
not interpreted as escape characters when they are reread.
UNIX troff would interpret them as escape characters when
they were reread and would end up printing one \\. The
correct way to obtain a printable \\ is to use the \\ee
escape sequence: this will always print a single instance
of the current escape character, regardless of whether or
not it is used in a diversion; it will also work in both
GNU troff and UNIX troff. If you wish for some reason to
store in a diversion an escape sequence that will be
interpreted when the diversion is reread, you can either
use the traditional \\!! transparent output facility, or, if
this is unsuitable, the new \\?? escape sequence.
EENNVVIIRROONNMMEENNTT
GGRROOFFFF__TTMMAACC__PPAATTHH
A colon separated list of directories in which to
search for macro files. ttrrooffff will scan directo
ries given in the --MM option before these, and in
standard directories (current directory if in
unsafe mode, home directory, //uussrr//ffrreeee
wwaarree//sshhaarree//ggrrooffff//ssiittee--ttmmaacc, //uussrr//ffrreeee
wwaarree//lliibb//ggrrooffff//ssiittee--ttmmaacc, //uussrr//ffrreeee
wwaarree//sshhaarree//ggrrooffff//11..1177..22//ttmmaacc) after these.
GGRROOFFFF__TTYYPPEESSEETTTTEERR
Default device.
GGRROOFFFF__FFOONNTT__PPAATTHH
A colon separated list of directories in which to
search for the ddeevv_n_a_m_e directory. ttrrooffff will scan
directories given in the --FF option before these,
and in standard directories (//uussrr//ffrreeee
wwaarree//sshhaarree//ggrrooffff//11..1177..22//ffoonntt:://uussrr//lliibb//ffoonntt) after
these.
FFIILLEESS
//uussrr//ffrreeeewwaarree//sshhaarree//ggrrooffff//11..1177..22//ttmmaacc//ttrrooffffrrcc
Initialization file (called before any other macro
package).
//uussrr//ffrreeeewwaarree//sshhaarree//ggrrooffff//11..1177..22//ttmmaacc//ttrrooffffrrcc--eenndd
Initialization file (called after any other macro
package).
//uussrr//ffrreeeewwaarree//sshhaarree//ggrrooffff//11..1177..22//ttmmaacc//_n_a_m_e..ttmmaacc
//uussrr//ffrreeeewwaarree//sshhaarree//ggrrooffff//11..1177..22//ttmmaacc//ttmmaacc.._n_a_m_e
Macro files
//uussrr//ffrreeeewwaarree//sshhaarree//ggrrooffff//11..1177..22//ffoonntt//ddeevv_n_a_m_e//DDEESSCC
Device description file for device _n_a_m_e.
//uussrr//ffrreeeewwaarree//sshhaarree//ggrrooffff//11..1177..22//ffoonntt//ddeevv_n_a_m_e//_F
Font file for font _F of device _n_a_m_e.
Note that ttrrooffffrrcc and ttrrooffffrrcc--eenndd are neither searched in
the current nor in the home directory by default for secu
rity reasons (even if the --UU option is given). Use the --MM
command line option or the GGRROOFFFF__TTMMAACC__PPAATTHH environment
variable to add these directories to the search path if
necessary.
SSEEEE AALLSSOO
ggrrooffff(7) -- This is a short but complete reference of all
requests, registers, and escapes.
ggrrooffff(1), ttbbll(1), ppiicc(1), eeqqnn(1), rreeffeerr(1), ssooeelliimm(1),
ggrrnn(1), ggrrooppss(1), ggrrooddvvii(1), ggrroottttyy(1), ggrroohhttmmll(1),
ggrroolljj44(1), ggrrooffff__ffoonntt(5), ggrrooffff__oouutt(5), ggrrooffff__cchhaarr(7)
Groff Version 1.17.2 27 June 2001 TROFF(1)